package com.wxtl.entity;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.apache.struts2.json.annotations.JSON;

import com.wxtl.util.JaxbAdapter;

/**
 * UpgradePack entity. @author MyEclipse Persistence Tools
 */
@XmlType(name = "upgradepack", propOrder = { "upgradeId", "upCode", "upType",
		"upName", "proCode", "price", "consumType", "suptVersion",
		"suptRevision", "exVersion", "downpath", "md5Value", "releaseDate",
		"author", "downTotal", "description", "detail", "isPush", "state",
		"category","packSize" })
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
@Entity
@Table(name = "upgrade_pack", catalog = "upweb")
public class UpgradePack implements java.io.Serializable {

	// Fields
	@XmlElement(nillable=true)
	private Integer upgradeId;
	@XmlElement(nillable=true)
	private String upCode;
	@XmlElement(nillable=true)
	private Integer upType;
	@XmlElement(nillable=true)
	private String upName;
	@XmlElement(nillable=true)
	private String proCode;
	@XmlElement(nillable=true)
	private String price;
	@XmlElement(nillable=true)
	private Integer consumType;
	@XmlElement(nillable=true)
	private String suptVersion;
	@XmlElement(nillable=true)
	private String suptRevision;
	@XmlElement(nillable=true)
	private String exVersion;
	@XmlElement(nillable=true)
	private String downpath;
	@XmlElement(nillable=true)
	private String md5Value;
	@XmlElement(nillable=true)
	@XmlJavaTypeAdapter(value=JaxbAdapter.class)
	private Timestamp releaseDate;
	@XmlElement(nillable=true)
	private String author;
	@XmlElement(nillable=true)
	private Integer downTotal;
	@XmlElement(nillable=true)
	private String description;
	@XmlElement(nillable=true)
	private String detail;
	@XmlElement(nillable=true)
	private Boolean isPush;
	@XmlElement(nillable=true)
	private Integer state;
	@XmlElement(nillable=true)
	private String category;
	@XmlElement(nillable=true)
	private Integer packSize;

	// Constructors

	/** default constructor */
	public UpgradePack() {
	}

	/** full constructor */
	public UpgradePack(String upCode, Integer upType, String upName,
			String proCode, String price, Integer consumType,
			String suptVersion, String suptRevision, String exVersion,
			String downpath, String md5Value, Timestamp releaseDate, String author,
			Integer downTotal, String description, String detail,
			Boolean isPush, Integer state, String category,Integer pageSize, Integer packSize) {
		this.upCode = upCode;
		this.upType = upType;
		this.upName = upName;
		this.proCode = proCode;
		this.price = price;
		this.consumType = consumType;
		this.suptVersion = suptVersion;
		this.suptRevision = suptRevision;
		this.exVersion = exVersion;
		this.downpath = downpath;
		this.md5Value = md5Value;
		this.releaseDate = releaseDate;
		this.author = author;
		this.downTotal = downTotal;
		this.description = description;
		this.detail = detail;
		this.isPush = isPush;
		this.state = state;
		this.category = category;
		this.packSize = packSize;
	}
	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "upgradeId", unique = true, nullable = false)
	public Integer getUpgradeId() {
		return this.upgradeId;
	}

	public void setUpgradeId(Integer upgradeId) {
		this.upgradeId = upgradeId;
	}

	@Column(name = "upCode", length = 20)
	public String getUpCode() {
		return this.upCode;
	}

	public void setUpCode(String upCode) {
		this.upCode = upCode;
	}

	@Column(name = "upType")
	public Integer getUpType() {
		return this.upType;
	}

	public void setUpType(Integer upType) {
		this.upType = upType;
	}

	@Column(name = "upName", length = 50)
	public String getUpName() {
		return this.upName;
	}

	public void setUpName(String upName) {
		this.upName = upName;
	}

	@Column(name = "proCode", length = 20)
	public String getProCode() {
		return this.proCode;
	}

	public void setProCode(String proCode) {
		this.proCode = proCode;
	}

	@Column(name = "price", length = 100)
	public String getPrice() {
		return this.price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	@Column(name = "consumType")
	public Integer getConsumType() {
		return this.consumType;
	}

	public void setConsumType(Integer consumType) {
		this.consumType = consumType;
	}

	@Column(name = "suptVersion", length = 20)
	public String getSuptVersion() {
		return this.suptVersion;
	}

	public void setSuptVersion(String suptVersion) {
		this.suptVersion = suptVersion;
	}

	@Column(name = "suptRevision", length = 20)
	public String getSuptRevision() {
		return this.suptRevision;
	}

	public void setSuptRevision(String suptRevision) {
		this.suptRevision = suptRevision;
	}

	@Column(name = "exVersion", length = 20)
	public String getExVersion() {
		return this.exVersion;
	}

	public void setExVersion(String exVersion) {
		this.exVersion = exVersion;
	}

	@Column(name = "downpath", length = 100)
	public String getDownpath() {
		return this.downpath;
	}

	public void setDownpath(String downpath) {
		this.downpath = downpath;
	}

	@Column(name = "md5Value", length = 100)
	public String getMd5Value() {
		return this.md5Value;
	}

	public void setMd5Value(String md5Value) {
		this.md5Value = md5Value;
	}

	@JSON(format="yyyy-MM-dd HH:mm:ss")
	@Column(name = "releaseDate", length = 19)
	public Timestamp getReleaseDate() {
		return this.releaseDate;
	}

	public void setReleaseDate(Timestamp releaseDate) {
		this.releaseDate = releaseDate;
	}

	@Column(name = "author", length = 20)
	public String getAuthor() {
		return this.author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	@Column(name = "downTotal")
	public Integer getDownTotal() {
		return this.downTotal;
	}

	public void setDownTotal(Integer downTotal) {
		this.downTotal = downTotal;
	}

	@Column(name = "description", length = 200)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "detail", length = 65535)
	public String getDetail() {
		return this.detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	@Column(name = "isPush")
	public Boolean getIsPush() {
		return this.isPush;
	}

	public void setIsPush(Boolean isPush) {
		this.isPush = isPush;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "category", length = 200)
	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}
	@Column(name = "packSize", length=20)
	public Integer getPackSize() {
		return packSize;
	}

	public void setPackSize(Integer packSize) {
		this.packSize = packSize;
	}
}